<template>
  <div class="detail">
    <ke-header />
    <ke-detail-banner :sourceList="courseList" />
    <div class="main">
      <ke-tab />
      <router-view />
    </div>
    <ke-footer />
  </div>
</template>

<script>
export default {
  name: 'Detailcourse',
  components: {
    keHeader: () => import('../components/ke-header'),
    keDetailBanner: () => import('../components/ke-detail-banner'),
    keTab: () => import('../components/ke-tab'),
    keFooter: () => import('../components/ke-footer')
  },
  data() {
    return {
      courseList: []
    }
  },
  created() {
    this.getLimitCourse()
  },
  methods: {
    getLimitCourse() {
      this.$axios.get('/api/course/limitTimeCourse').then(res => {
        const courseList = res.data.data
        this.courseList = courseList
      })
    }
  }
}
</script>

<style lang="stylus" scoped>
.detail {
  overflow: hidden;

  .main {
    position: relative;
    width: 1200px;
    margin: 20px auto 20px;
    padding: 0 20px;
    box-sizing: border-box;
  }
}
</style>
